package com.ytjj.qmyx.supplychain.service;

import com.ytjj.qmyx.supplychain.mapper.BankerSpecialMapper;
import com.ytjj.qmyx.supplychain.mapper.entity.YxBankerSpecial;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import tk.mybatis.mapper.entity.Example;

import javax.annotation.Resource;

@Slf4j
@Service
public class BankerSpecialService {
    @Resource
    private BankerSpecialMapper bankerSpecialMapper;

    public YxBankerSpecial getBankerSpecial(Integer bankerId, Integer bankerProductId) {
        Example example = new Example(YxBankerSpecial.class);
        example.createCriteria().andEqualTo("bankerId", bankerId).andEqualTo("bankerProductId", bankerProductId)
        .andEqualTo("status", 1);
        YxBankerSpecial bean = bankerSpecialMapper.selectOneByExample(example);
        return bean;
    }
}
